﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using KeRui.Common;
using System.Collections.Generic;


public partial class Manage_Cms_TemplateFileList : System.Web.UI.Page
{
    public List<KeRui.Model.SysConfig> listType;
    public List<KeRui.Model.CmsTemplateFile> list;
    public KeRui.Model.CmsTemplate modelTemplate;
    public int TemplateID = PageRequest.GetInt("TemplateID", -1);
    public int FileType = PageRequest.GetInt("FileType", -1);
    public string FileName = PageRequest.GetString("filename");
    public DataSet ds;
    protected int SiteID = -1;

    protected void Page_Load(object sender, EventArgs e)
    {
        //检查管理员登录HYC
        ManageHelper.CheckAdminLogin();
        SiteID = PageRequest.GetInt("siteID", -1);
        KeRui.BLL.CmsTemplate bllTemplate = new KeRui.BLL.CmsTemplate();
        modelTemplate = bllTemplate.GetModel(TemplateID);
        if (modelTemplate == null)
            Response.Redirect("TemplateList.aspx?errmsg=无法获取请求模板信息。");

        KeRui.BLL.CmsTemplateFile bllTemplateFile = new KeRui.BLL.CmsTemplateFile();

        //Response.Write(FileType); Response.End();
        list = bllTemplateFile.GetList(modelTemplate.TemplateID, FileType, FileName);

        KeRui.BLL.SysConfig bllConfig = new KeRui.BLL.SysConfig();
        ds = bllConfig.GetSelect("TemplateFileType", -1);
        listType = bllConfig.GetList("TemplateFileType", -1);
    }
}
